﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DAL;

namespace BLL
{
    public abstract class BLLBase
    {
        protected IUnitOfWork IUnitOfWork { get; private set; }
        public BLLBase()
            : this(null)
        {

        }
        public BLLBase(IUnitOfWork iUnitOfWork)
        {
            IUnitOfWork = iUnitOfWork;
        }
        protected ICompleteRepository<T> LoadRepository<T>() where T : class
        {
            return IUnitOfWork == null ? new TestBase<T>() : new TestBase<T>(IUnitOfWork);
        }
    }
}